import { request } from '@/utils'

export function list(params) {
  return request({
    url: `/testObject/page`,
    method: 'get',
    params,
  })
}

export function listAll(params) {
  return request({
    url: `/testObject/list`,
    method: 'get',
    params,
  })
}

export function info(id) {
  return request({
    url: `/testObject/${id}`,
    method: 'get',
  })
}

export function add(data) {
  return request({
    url: `/testObject`,
    method: 'post',
    data,
  })
}

export function edit(data) {
  return request({
    url: `/testObject`,
    method: 'put',
    data,
  })
}

export function del(id) {
  return request({
    url: `/testObject/${id}`,
    method: 'delete',
  })
}

export function getFile(filePath) {
  return request({
    url: `/testObject/file`,
    method: 'get',
    params: { filePath },
  })
}

export function metaTaskTypeList(params) {
  return request({
    url: `/metaTaskType/list`,
    method: 'get',
    params,
  })
}

export function tagList(params) {
  return request({
    url: `/testObjectTag/list`,
    method: 'get',
    params,
  })
}

export function tag2List(params) {
  return request({
    url: `/testObjectTag2/list`,
    method: 'get',
    params,
  })
}

export function typeList(params) {
  return request({
    url: `/testObjectType/list`,
    method: 'get',
    params,
  })
}

export function frameList(params) {
  return request({
    url: `/algorithm/frame/list`,
    method: 'get',
    params,
  })
}

export function modeList(params) {
  return request({
    url: `/testMode/list`,
    method: 'get',
    params,
  })
}

export function testIndicatorList(data = {}) {
  return request({
    url: `/testIndicator/list`,
    method: 'post',
    data,
  })
}

export function evaluateIndicator(data = {}) {
  return request({
    url: `/evaluationIndicator/list`,
    method: 'post',
    data,
  })
}

export function scenarioList(params) {
  return request({
    url: `/testScenario/list`,
    method: 'get',
    params,
  })
}

export function subjectList(data = {}) {
  return request({
    url: `/testSubjects/list`,
    method: 'post',
    data,
  })
}

export function emulatorList(data = {}) {
  return request({
    url: `/testEmulator/list`,
    method: 'post',
    data,
  })
}

export function methodsList(data = {}) {
  return request({
    url: `/testMethod/list`,
    method: 'post',
    data,
  })
}

export function testTypeList(params) {
  return request({
    url: `/testType/list`,
    method: 'get',
    params,
  })
}

export function evaluationModelList(data) {
  return request({
    url: `/evaluationRecord/selectEvalModels`,
    method: 'post',
    data,
  })
}

export function executeFeedbackList(testId) {
  return request({
    url: `/messageRecord/historylist/${testId}`,
    method: 'get',
  })
}

export function executeOutputList(params) {
  return request({
    url: `/execute/log/page`,
    method: 'get',
    params,
  })
}
